require "analysis/IndividualPerformance"
require "analysis/LayerPerformance"
require "analysis/LayerAccuracy"
require "analysis/LayerKeystrokeCount"
require "analysis/IndividualAccuracy"
require "analysis/IndividualKeystrokeCount"
require "analysis/IndividualUnrealizedMistakes"
require "analysis/SetPerformance"
require "analysis/SetAccuracy"
require "analysis/AverageDurationPerCorrectCharacter"
require "analysis/AverageDurationPerCorrectCharacterByLayer"
require "analysis/AverageDurationPerCorrectCharacterBySubject"
require "analysis/AverageDurationPerCorrectCharacterPerSetBySubject"
require "analysis/AverageDurationPerCorrectCharacterPerLayerBySubject"
require "analysis/AverageDurationPerCorrectCharacterPerPhraseBySet"
require "data/ExperimentalData"
require "data/PhraseCards"


class Analyzer
  
  def initialize(experimentalData, phraseCards)
    @experimentalData = experimentalData
    @phraseCards = phraseCards  
  end
  

  def performAnalysis
    #dir = "/Users/kklo/Desktop/543PilotResults/individual_performance"
    #IndividualPerformance.new.analyze(dir, @experimentalData, @phraseCards, true)

    #dir = "/Users/kklo/Desktop/543PilotResults/layer_performance"    
    #LayerPerformance.new.analyze(dir, @experimentalData, @phraseCards, true)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/inidividual_accuracy_bs_per_phrase"
    #IndividualAccuracy.new.analyze(dir, @experimentalData, @phraseCards)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/inidividual_key_count"
    #IndividualKeystrokeCount.new.analyze(dir, @experimentalData, @phraseCards)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/inidividual_editdistance"
    #IndividualUnrealizedMistakes.new.analyze(dir, @experimentalData, @phraseCards)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/layer_accuracy_bs_per_phrase"
    #LayerAccuracy.new.analyze(dir, @experimentalData, @phraseCards)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/layer_key_count"
    #LayerKeystrokeCount.new.analyze(dir, @experimentalData, @phraseCards)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/set_performance"
    #SetPerformance.new.analyze(dir, @experimentalData, @phraseCards, true)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/set_accuracy_bs_per_phrase"
    #SetAccuracy.new.analyze(dir, @experimentalData, @phraseCards)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/average_duration_between_correct_character"
    #AverageDurationPerCorrectCharacter.new.analyze(dir, @experimentalData, @phraseCards)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/average_duration_between_correct_character_by_layer"
    #AverageDurationPerCorrectCharacterByLayer.new.analyze(dir, @experimentalData, @phraseCards)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/average_duration_between_correct_character_by_subject"
    #AverageDurationPerCorrectCharacterBySubject.new.analyze(dir, @experimentalData, @phraseCards)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/average_duration_between_correct_character_of_each_set_by_subject"
    #AverageDurationPerCorrectCharacterPerSetBySubject.new.analyze(dir, @experimentalData, @phraseCards)
    
    #dir = "/Users/kklo/Desktop/543PilotResults/average_duration_between_correct_character_of_each_layer_by_subject"
    #AverageDurationPerCorrectCharacterPerLayerBySubject.new.analyze(dir, @experimentalData, @phraseCards)
    
    dir = "/Users/kklo/Desktop/543PilotResults/average_duration_between_correct_character_of_each_phrase_by_set"
    AverageDurationPerCorrectCharacterPerPhraseBySet.new.analyze(dir, @experimentalData, @phraseCards)
    
  end
  
end